Fix a bad dataState value when an error occurs on a deferred field that bubbles to the defer boundary - #13376
Fix a bad dataState value when an error occurs on a deferred field that bubbles to the defer boundary#13376jerelmiller wants to merge 2 commits into
dataState value when an error occurs on a deferred field that bubbles to the defer boundary#13376Conversation
…ndary works as expected
✅ Docs preview readyThe preview is ready to be viewed. View the preview File Changes 0 new, 1 changed, 0 removedBuild ID: 22d78122423c4ea713325a69 URL: https://www.apollographql.com/docs/deploy-preview/22d78122423c4ea713325a69 ✅ AI Style Review — No Changes DetectedNo MDX files were changed in this pull request. Review Log: View detailed log
|
🦋 Changeset detectedLatest commit: f0431c5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe change preserves ChangesDeferred streaming state
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/core/QueryInfo.tsESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. src/incremental/handlers/__tests__/graphql17Alpha9/defer.test.tsESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
While working on an experiment for an unrelated issue, I stumbled upon this behavior. Currently an error reported by a
@deferfield that bubbles to the defer boundary reports the final chunk to the user ascompleteinstead ofstreamingeven though the result still has the hole in the data. This fix unconditionally applies thediffdata toresultwhen thedataStateis streaming rather than only applying to whenhasNextis true. This makes sure the final chunk delivers the rightdataStatevalue.Summary by CodeRabbit
@deferqueries incorrectly reporting a complete state when deferred-field errors occur.